package de.kum.fragments;

import de.kum.dhdroid.R;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class BudgetManagement extends Fragment implements DHDroidFragments {

	private static final String TAB_TITLE = "Haushaltsbuch";

	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		if (container == null) {
			return null;
		}
		return (View) inflater.inflate(R.layout.budgetmanagement_fragment,
				container, false);
	}

	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);

		BudgetManagementOverview overview = new BudgetManagementOverview();
		FragmentManager fm = getActivity().getSupportFragmentManager();
		FragmentTransaction transaction = fm.beginTransaction();
		transaction.replace(R.id.bm_fragment_container, overview);
		transaction.commit();
	}

	public String getTabTitle() {
		return TAB_TITLE;
	}

}
